﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;


namespace Utility2DLibrary
{
    public class RightTrianglePolyShape : VisualObject
    {
        public RightTrianglePolyShape(Effect shaderEffect, Texture2D texture, Point origin, float mass): base(shaderEffect,texture, origin, 0)
        {
            MassPoint p1;
            MassPoint p2;
            MassPoint p3;
            float averageMass = mass / 3;
            p1 = new MassPoint(0, 0, averageMass);
            p2 = new MassPoint(-1, 0, averageMass);
            p3 = new MassPoint(0, 1, averageMass);
            base.PrimitivePoints.Add(p1);
            base.PrimitivePoints.Add(p2);
            base.PrimitivePoints.Add(p3);
            //base.PrimitivePoints.Add(new MassPoint(0, 0, 1));
            //base.PrimitivePoints.Add(new MassPoint(1, 0, 1));
            //base.CenterOfMass = new Point(0, 0);
            base.CalculateCenterOfMass();
        }
    }
}
